package com.api.video;

import com.edu.entity.HfdVideoInfo;
import com.edu.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p>title: com.api.user</p>
 * author 曾宪霖
 * description:
 */
@Component
//远程调用
@FeignClient("edu-video")
@RequestMapping("/video")
public interface VideoClient {

    /**
     * 添加视频
     *
     * @param hfdVideoInfo
     * @return
     */
    @RequestMapping("addVideo")
    Result addVideo(@RequestBody HfdVideoInfo hfdVideoInfo);

    /**
     * 根据video_id删除视频
     *
     * @return
     */
    @RequestMapping("deleteVideoById")
    Result deleteVideoById(@RequestParam("videoId") Integer videoId);

    /**
     * 查询所有视频信息
     *
     * @return
     */
    @RequestMapping("queryVideo")
    Result queryVideo();

    /**
     * 根据video_id修改视频信息
     *
     * @param hfdVideoInfo
     * @return
     */
    @RequestMapping("updateVideoById")
    Result updateVideoById(@RequestBody HfdVideoInfo hfdVideoInfo);

    /**
     * 上传视频文件
     *
     * @param hfdVideoInfo
     * @return
     */
    @RequestMapping("uploadVideo")
    Result uploadVideo(@RequestBody HfdVideoInfo hfdVideoInfo);

}
